#pragma once
#include<fcntl.h>
enum Sock
{
    ok=0,
    sockerr,
    binderr,
    listenerr,
    usageerr,
    connecterr,
    accepterr,
    epoll_create_err,
    epoll_ctl_err,
    epoll_wait_err,
};
//把文件描述符设置为非阻塞
void SetNonBlock(int fd)
{
    int fl=fcntl(fd,F_GETFL);
    if(fl<0)
    {
        return;
    }
    fcntl(fd,F_SETFL,fl|O_NONBLOCK);
}
class nocopy
{
public:
    nocopy()
    {}
    nocopy(nocopy& n)=delete;
    nocopy& operator=(nocopy& n)=delete;
    ~nocopy()
    {}
private:
};